package skypeUtil;

import java.sql.ResultSet;
import java.util.Scanner;


public class SkypeStart {
	//commands list
	private static final String QUIT="quit";
	private static final String EXIT="exit";

	
	public static void main(String[] args) throws ClassNotFoundException {
		ConnectToSkypeDB connect=new ConnectToSkypeDB();
		SkypeUtilFunctionImpl func=new SkypeUtilFunctionImpl();
		connect.connectToSkypeDB();
		System.out.println("Skype Utility has been started. \nUsage:command param\nType \"commandList\" for details");
		Scanner sc=new Scanner(System.in);
		String str = "";
		System.out.print(">");
		while(true){
			str=sc.nextLine();
			if(str.equals(EXIT) || str.equals(QUIT)) {
				break;
			}

			Runnable r = new SkypeStartRunner(func, str, connect.getStatement());
			Thread t = new Thread(r);
			t.start();
			
		}		
		connect.disconnectFromSkypeDB();
	}
}